<?php
session_start();
require ("commun/conf.inc.php");
require ("commun/sql.inc.php");
require ("commun/outils.inc.php");
require ("commun/pages.inc.php");
require ("include/header.php");


$connexion=sql_connecter();
if(isset($_SESSION['login']))
{
	$requete="SELECT * FROM users WHERE email_user=".$_SESSION['login'];
	$result=sql_executer($connexion,$requete);
	$ligne=sql_lire_ligne_tableau($result);
	$id_user=$ligne['id_user'];
}
printf("<body  OnLoad=\"cacheId('contenu');cacheId('cadre_reponses');\">");
//printf("<body>");
// Start: page-top-outer -->
printf("<div id=\"page-top-outer\">");

// Start: page-top -->
printf("<div id=\"page-top\">");

// start logo -->
printf("<div id=\"logo\">");
// <a href="index.php"><img src="images/shared/logo.png" width="156"height="40" alt="" /> </a> -->
printf("</div>");
// end logo -->

//  start top-search -->
printf("<div id=\"top-search\">");
printf("<form method=\"post\" action=\"index.php?join=recherche\">");
printf("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
printf("<tr>");
printf("<td><input type=\"text\" placeholder=\"Chercher\" class=\"top-search-inp\" name=\"text\"/></td>");
printf("<td><select class=\"styledselect\" name=\"choix\">");
printf("<option value=\"all\">Tout</option>");
printf("<option value=\"tutoriel\">Tutoriels</option>");
printf("<option value=\"question\">Questions</option>");
printf("<option value=\"reponse\">Réponses</option>");
printf("<option value=\"news\">News</option>");
printf("</select>");
printf("</td>");
printf("<td><input type=\"image\" src=\"images/shared/top_search_btn.gif\" onclick=\"this.submit()\" />");
printf("</td>");
printf("</tr>");
printf("</table>");
printf("</form>");
printf("</div>");
//  end top-search -->
printf("<div class=\"clear\"></div>");

printf("</div>");
// End: page-top -->

printf("</div>");
// End: page-top-outer -->




printf("<div class=\"clear\">&nbsp;</div>");

//  start nav-outer-repeat................................................................................................. START -->
printf("<div class=\"nav-outer-repeat\">");
//  start nav-outer -->
printf("<div class=\"nav-outer\">");

// start nav-right -->
printf("<div id=\"nav-right\">");

if(isset($_SESSION['login']))
{
	printf("<div class=\"nav-divider\">&nbsp;</div>");
	printf("<div class=\"log_name\">Bienvenue ");
	printf($_SESSION['login']);
	printf("</div>");
}


printf("<div class=\"nav-divider\">&nbsp;</div>");
printf("<div class=\"showhide-account\">");
printf("<img src=\"images/shared/nav/nav_myaccount.gif\" width=\"93\"
						height=\"14\" alt=\"\" />");
printf("</div>");

if(isset($_SESSION['login']))
{
	printf("<div class=\"nav-divider\">&nbsp;</div>");
	printf("<a href=\"content/logout.php\" id=\"logout\">");
	printf("<img src=\"images/shared/nav/nav_logout.gif\" width=\"64\" height=\"14\" alt=\"\" /> </a>");
	printf("<div class=\"clear\">&nbsp;</div>");
}
//  start account-content -->
printf("<div class=\"account-content\">");
printf("<div class=\"account-drop-inner\">");

if(isset($_SESSION['login']))
{
	printf("<a href=\"\" id=\"acc-settings\">Paramètres</a>");
	printf("<div class=\"clear\">&nbsp;</div>");
	printf("<div class=\"acc-line\">&nbsp;</div>");
	printf("<a href=\"\" id=\"acc-details\">Détails personnels </a>");
	printf("<div class=\"clear\">&nbsp;</div>");
	printf("<div class=\"acc-line\">&nbsp;</div>");
	printf("<a href=\"\" id=\"acc-project\">Project details</a>");
	printf("<div class=\"clear\">&nbsp;</div>");
	printf("<div class=\"acc-line\">&nbsp;</div>");
	printf("<a href=\"\" id=\"acc-inbox\">Messagerie</a>");
	printf("<div class=\"clear\">&nbsp;</div>");
	printf("<div class=\"acc-line\">&nbsp;</div>");
	printf("<a href=\"\" id=\"acc-stats\">Statistiques</a>");
}
else {

	printf("<a href=\"$page_login\" id=\"acc-login\">Se connecter</a>");
	printf("<div class=\"clear\">&nbsp;</div>");
	printf("<div class=\"acc-line\">&nbsp;</div>");
	printf("<a href=\"$page_sign_in\" id=\"acc-signin\">S'inscrire</a>");
}
printf("</div>");

printf("</div>");
//  end account-content -->

printf("</div>");
// end nav-right -->


//  start nav -->
require ('include/menu.php');
//  start nav -->


printf("</div>");
printf("<div class=\"clear\"></div>");
//  start nav-outer -->
printf("</div>");
//  start nav-outer-repeat................................................... END -->

printf("<div class=\"clear\"></div>");
//require ('include/panel_admin.php');
// start content-outer ........................................................................................................................START -->
printf("<div id=\"content-outer\">");
// \"tart content -->
printf("<div id=\"content\">");

require ("content/join.php");
/****************************************************************************************/
/*                                      bouton up                                       */
/****************************************************************************************/
printf("<div id=\"btn_up\" >");
printf("<img alt=\"Retour en haut\" title=\"Haut de page\"
					src=\"images/icones/fleche_upc.png\" width=\"100\" />");
printf("</div>");

printf("</div>");
//  end content -->
printf("<div class=\"clear\">&nbsp;</div>");


printf("</div>");
//  end content-outer........................................................END -->

printf("<div class=\"clear\">&nbsp;</div>");

require ("include/footer.php");
